var express = require('express');
var router = express.Router();
var weixinCtrl = require('../controllers/weixin');
var activityCtrl = require('../controllers/activity');
var prizeCtrl = require('../controllers/prize');
var userCtrl = require('../controllers/user');
var reportCtrl = require('../controllers/report');

router.route('/verify')
	.get(weixinCtrl.verify)
	.post(weixinCtrl.robot)	

router.route('/syncserver')
	.get(weixinCtrl.syncserver)

router.route('/code2token')
	.get(weixinCtrl.code2token)

router.route('/getnowtoken')
	.get(weixinCtrl.getnowtoken)

router.route('/createMenu')
	.get(weixinCtrl.createMenu)

router.route('/beginsave')
	.get(weixinCtrl.beginsave)

router.route('/activity')
	.get(activityCtrl.activity)

router.route('/activity/queryOne')
	.get(activityCtrl.queryOne)

router.route('/activity/create')
	.post(activityCtrl.create)

router.route('/activity/helper')
	.post(activityCtrl.helper)

router.route('/activity/queryFromUser')
	.get(activityCtrl.queryFromUser)

router.route('/prize/query')
	.get(prizeCtrl.query)

router.route('/prize/queryAll')
	.get(prizeCtrl.queryAll)


router.route('/prize/queryAsyncAll')
	.get(prizeCtrl.queryAsyncAll)

router.route('/prize/ensureUse')
	.post(prizeCtrl.ensureUse)

router.route('/user/myHelpers')
	.get(userCtrl.myHelpers)

router.route('/report')
	.get(reportCtrl.report)

router.route('/report/queryAll')
	.get(reportCtrl.queryAll)
	
module.exports = router;